import os,sys
import logging
import unittest

""" Other modules """
import pygame

""" Game """
from constants import *
import settings
import level
import ui.mainmenu
import player
import eventrouter
import input
import inputhandler
import session
import mixboard
import ui.widget

""" Constants """

""" Set up logging """
_log = logging.getLogger("epicquest.test.test-widget")
_log.debug("Testing UI elements")


class WidgetTestCase(unittest.TestCase):
    def setUp(self):
        self.widget = Widget('The widget')

    def tearDown(self):
        self.widget.dispose()
        self.widget = None

    def test_default_size(self):
        self.assertEqual(self.widget.size(), (50,50),
                         'incorrect default size')

    def test_resize(self):
        self.widget.resize(100,150)
        self.assertEqual(self.widget.size(), (100,150),
                         'wrong size after resize')
